<!-- @format -->

<template>
  <section class="todoapp">
    <!-- 使用组件 -->
    <TodoHeader />
    <TodoMain :arr="todoList" />
    <TodoFooter />
  </section>
</template>

<script>
  // 从 styles 目录下导入相关样式
  import './styles/base.css'
  import './styles/index.css'

  // 导入组件
  import TodoHeader from './components/TodoHeader.vue'
  import TodoMain from './components/TodoMain.vue'
  import TodoFooter from './components/TodoFooter.vue'
  export default {
    name: 'App',
    // 注册组件
    components: {
      TodoHeader,
      TodoMain,
      TodoFooter
    },
    data() {
      return {
        // 待办任务列表
        todoList: [
          { id: 100, name: '抽烟', done: true },
          { id: 101, name: '喝酒', done: true },
          { id: 102, name: '改bug', done: false }
        ]
      }
    }
  }
</script>
